package cn.itcast.nems.studentrecord.dto.odto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class EmsClassDTO {
    /** 班级ID */
    private Integer classinfoId;
    /** 班级名称 */
    private String className;
    /** 是否为待定班 */
    private boolean pending;
    /** 是否为待删班 */
    private boolean deleted;
    /** 是否为基础班 */
    private boolean basic;
    /** 开班日期 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate startDate;
    /** 结课日期 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate endDate;
    /** 预计结课日期 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate preEndDate;
    /** 班级类型code */
    private String classTypeCode;
    /** 班级类型名 */
    private String classTypeName;
    /** 授课模式code，FACETOFACE：面授，NEW_FACETOFACE：新型面授，UNITDOUBLET：双元，LIVE_BROADCAST：直播 */
    private String teachModeCode;
    /** 授课模式 */
    private String teachModeName;
    /** 报名时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime signupDateTime;
    /** 班级所在校区编码 */
    private String schoolCode;
    /** 班级所在校区 */
    private String schoolName;

    private String nature;
    private Boolean valid;

    private String subjectAccountName;
    private String subjectAccountCode;

}
